文章目录
  1. 1. homeBrew Uninstall the previous version
    1. 1.1. http://brew.sh
    2. 1.2. install homebrew
    3. 1.3. ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
    4. 1.4. Uninstall the previous version
    5. 1.5. Find out how old versions are called
    6. 1.6. Install old versions
    7. 1.7. That’s it

homeBrew Uninstall the previous version

macOS homebrew

http://brew.sh

install homebrew

ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”

Uninstall the previous version

Make sure you don’t have an old version of the package installed:

|```
1
2


|```
$ brew uninstall svn
$ sudo mv /usr/bin/svn /usr/bin/svn1.6

|
|——–|—————————————————————-|

In the case of svn, I also needed to remove the version that comes by default with OS X, as Homebrew is not able to unlink the two.

Find out how old versions are called

|```
1
2
3


|```
$ brew search subversion
subversion
homebrew/versions/subversion16  homebrew/versions/subversion17

|
|———|——————————————————————————————————|

The above tells you what svn packages are available. Note that searching for svn instead of subversionreturns the current version only for some reason. So that tells me that svn 1.7.something is calledsubversion17 in Homebrew world, and it can be found into versions

Install old versions

|```
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


|```
$ brew tap homebrew/versions
Cloning into '/usr/local/Library/Taps/homebrew-versions'...
remote: Counting objects: 1022, done.
remote: Compressing objects: 100% (566/566), done.
remote: Total 1022 (delta 585), reused 873 (delta 456)
Receiving objects: 100% (1022/1022), 250.05 KiB | 428 KiB/s, done.
Resolving deltas: 100% (585/585), done.
Tapped 98 formula

$ brew install subversion17
==> Downloading http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.10.tar.bz2
Already downloaded: /Library/Caches/Homebrew/subversion17-1.7.10.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/subversion17/1.7.10 --with-apr=/usr/bin --with-ssl --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with-serf=/usr/local/opt/serf --disable-neon-version-check --disable-mod-activation --disable-nls --without-apache-libexecdir --without-berkel
==> make
==> make install
==> make tools
==> make install-tools
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
/usr/local/Cellar/subversion17/1.7.10: 106 files, 7.7M, built in 3.1 minutes

|
|—————————————–|————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–|

Before you install a version you need to enable the whole “getting old versions” thing - you do that with thetap command. Afterwards, it’s just a matter of installing the package I found earlier.

That’s it

Job done.

文章目录
  1. 1. homeBrew Uninstall the previous version
    1. 1.1. http://brew.sh
    2. 1.2. install homebrew
    3. 1.3. ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
    4. 1.4. Uninstall the previous version
    5. 1.5. Find out how old versions are called
    6. 1.6. Install old versions
    7. 1.7. That’s it